package cn.xutingyin.mycat.service.impl;

import cn.xutingyin.mycat.dao.UserMapper;
import cn.xutingyin.mycat.entity.User;
import cn.xutingyin.mycat.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
* @Description:     用户操作实现类
* @Author:          tingyin.xu
* @CreateDate:     2021/11/23 14:50
*/
@Service
public class UserServiceImpl  implements UserService {

    @Autowired
    private UserMapper userMapper;
    @Override
    public List<User> getList() {
        return userMapper.getList();
    }

    @Override
    public List<User> selectAll() {
        return userMapper.selectList(null);
    }

    @Override
    public int addUser(User user) {
        return userMapper.insert(user);
    }
}
